<!DOCTYPE HTML>
<html>
<head>
    <include file="Common:header_include"/>
    <title>医生信息列表</title>
    <style>
        #DataTables_Table_0_paginate{
            display: block;
        }
    </style>
</head>
<body>
<nav class="breadcrumb">
    <i class="Hui-iconfont">&#xe67f;</i> 首页 <span class="c-gray en">&gt;</span> 医生信息管理 <span class="c-gray en">&gt;</span> 医生信息列表
    <a class="btn btn-success radius r mr-20" style="line-height:1.6em;margin-top:3px" href="javascript:location.replace(location.href);" title="刷新">
        <i class="Hui-iconfont">&#xe68f;</i>
    </a>
</nav>
<div class="pd-10">
    <div class="cl pd-5 bg-1 bk-gray">
        <if condition="!I('get.del')">
            <span class="l">
                <a href="javascript:;" onclick="delectCheck('{:U('del')}',$('.item'))" class="btn btn-danger radius">
                        <i class="Hui-iconfont">&#xe6e2;</i> 批量删除
                </a>
             <!--    <a href="javascript:;" onclick="showIframe('添加医生','{:U('showAdd')}')" class="btn btn-primary radius">
                    <i class="Hui-iconfont">&#xe600;</i> 添加医生
                </a> -->
                   <a href="javascript:;" onclick="reviewedCheck('{:U('reviewed',array('reviewed'=>1))}',$('.item'),1)" class="btn btn-success radius">
                    <i class="Hui-iconfont">&#xe6e1;</i> 批量审核
                </a>
                <a href="javascript:;" onclick="reviewedCheck('{:U('reviewed',array('reviewed'=>0))}',$('.item'),0)" class="btn btn-warning radius">
                    <i class="Hui-iconfont">&#xe6dd;</i> 批量驳回
                </a>
            </span>
            <span class="l" style="margin-left:14px;">
                <label>按科室过滤：</label>
                <span class="select-box inline">
                    <select name="pid"  id="departmentid" class="select selects" onchange="reload();" style="width: 180px">
                        <option value="">全部</option>
                         <volist name=":getDepartmentinfoTree()" id="v">
                             <option value="{$v['id']}"  <if condition="$v['id'] eq $_GET['departmentid']">selected</if>  <if condition="$v['pid'] eq 0">disabled</if>>{$v['name']} </option>
                         </volist>
                    </select>
                </span>
            </span>
            <span class="l" style="margin-left:14px;">
                <label>按医院过滤：</label>
                <span class="select-box inline">
                    <select name="pid"  id="hospitalid" class="select selects" onchange="reload();" style="width: 180px">
                        <option value="">全部</option>
                         <volist name=":getList(hospitalinfo)" id="v">
                             <option value="{$v['id']}"  <if condition="$v['id'] eq $_GET['hospitalid']">selected</if>  >{$v['name']} </option>
                         </volist>
                    </select>
                </span>
            </span>
            <span class="l" style="margin-left:14px;">
                <label>按状态过滤：</label>
                <span class="select-box inline">
                    <select name="pid"  id="reviewed" class="select selects" onchange="reload();" style="width: 180px">
                        <option value=""<if condition="empty($_GET['reviewed'])">selected</if>  >全部</option>
                        <option value="-3" <if condition="$_GET['reviewed'] eq -3">selected</if> >未审核</option>
                        <option value="1" <if condition="$_GET['reviewed'] eq 1" >selected</if> >已审核</option>
                        <option value="2" <if condition="$_GET['reviewed'] eq 2">selected</if> >未通过</option>
                    </select>
                </span>
            </span>
            <else/>
            <a href="javascript:;" onclick="delectCheck('{:U('deleted')}',$('.item'))" class="btn btn-danger radius">
                <i class="Hui-iconfont">&#xe6e2;</i> 批量彻底删除
            </a>
        </if>
        <!--<span class="r">共有<strong>{:count($data)}</strong>条数据</span>-->
        <span class="r" style="margin-right: 10px">
            <if condition="!I('get.del')">
                <a href="javascript:;" onclick="showdeleted(true)" class="btn btn-danger radius">
                    <i class="Hui-iconfont">&#xe6e2;</i> 回收站
                </a>
                <else/>
                <a href="javascript:;" onclick="showdeleted(false)" class="btn btn-success radius">
                    <i class="Hui-iconfont">&#xe6d4;</i> 返回
                </a>
            </if>
        </span>
    </div>
    <div class="mt-10">
        <select name="select" id="selects"  onchange="reload()" style="width: 80px;height: 25px;">
            <option value="">请选择</option>
            <option value="10"  <if condition="$_GET['selects'] eq 10">selected</if>>显示10条</option>
            <option value="20"  <if condition="$_GET['selects'] eq 20">selected</if>  <if condition="empty($_GET['selects'])">selected</if>>显示20条</option>
            <option value="30"  <if condition="$_GET['selects'] eq 30">selected</if>>显示30条</option>
            <option value="40"  <if condition="$_GET['selects'] eq 40">selected</if>>显示40条</option>
            <option value="50"  <if condition="$_GET['selects'] eq 50">selected</if>>显示50条</option>
        </select>
        <div style=" float: right">
            <input type="text" name="keyword" placeholder="请输入关键字" style="width:200px" class="input-text" value="{$_GET['keyword']}">
            <button class="btn btn-success" type="submit" onclick="reload()"><i class="Hui-iconfont">&#xe665;</i> 搜索</button>
        </div>
        <table class="table table-border table-bordered table-hover table-bg ">
        <thead>
        <tr class="text-c">
            <th width="25"><input type="checkbox"></th>
            <th width="50">ID</th>
            <th width="80">用户名</th>
            <th width="50">头像</th>
            <th width="50">年龄</th>
            <th width="50">手机号</th>
            <th width="50">真名</th>
            <th width="50">医院</th>
            <th width="50">科室</th>
            <th width="50">职称</th>
            <th width="100">审核</th>
            <th width="100">时间</th>
            <th width="100">操作</th>
        </tr>
        </thead>
        <tbody>
        <if condition="empty($list)">
            <tr>
                <td colspan="14" class="text-c">暂无数据</td>
            </tr>
        </if>
        <volist name="list" id="data">
            <tr class="text-c">
                <td><input type="checkbox" value="{$data.id}" class="item"></td>
                <td>{$data.id}</td>
                <td><a href="javascript:;" onclick="showIframe('编辑','{:U('showEdit',array('id'=>$data['id']))}')">{$data.name}</a></td>
                <td>
                    <if condition="$data['cover']">
                        <img src="__UPS__{$data['cover']}" class="cover"/>
                        <else/>
                        <img src="__AIMG__no_cover.png" class="cover"/>
                    </if>
                </td>
                <td>{:birthday2($data['birthday'])}</td>
                <td>{$data.phone}</td>
                <td><a href="javascript:;" onclick="showIframe('编辑','{:U('showEdit',array('id'=>$data['id']))}')">{$data.realname}</a></td>
                <td>{$data.hospital.name}</td>
                <td>{$data.department.name}</td>
                <td>{$data.position.name}</td>
                <td>
                    <if condition="$data['status'] eq 1">
                        <a href="javascript:void(0);" onclick="showIframe('审核','{:U('showReviewed',array('id'=>$data['id']))}','500','600')"><span class="label label-success radius">审核通过</span></a>
                    </if>

                    <if condition="!$data['status']">
                        <a href="javascript:void(0);" onclick="showIframe('审核','{:U('showReviewed',array('id'=>$data['id']))}','500','600')"><span class="label label-danger radius">尚未审核</span></a>
                    </if>

                    <if condition="$data['status'] eq 2">
                       <a href="javascript:void(0);" onclick="showIframe('审核','{:U('showReviewed',array('id'=>$data['id']))}','500','600')"><span class="label label-danger radius">未通过</span></a>
                    </if>
                    <if condition="$data['status'] eq 3">
                       <a href="javascript:void(0);" onclick="showIframe('审核','{:U('showReviewed',array('id'=>$data['id']))}','500','600')"><span class="label label-danger radius">资料未完善</span></a>
                    </if>
                </td>
                <td>{$data['createtime']}</td>
                <td class="td-manage">
                    <if condition="I('get.del')">
                        <a title="恢复" href="javascript:;" onclick="recover('{:U('recover',array('id'=>$data['id']))}',this)" class="ml-5" style="text-decoration:none">
                            <i class="Hui-iconfont">&#xe6e1;</i> 恢复
                        </a>
                        <a title="彻底删除" href="javascript:;" onclick="delectOne('{:U('deleted',array('id'=>$data['id']))}',this)" class="ml-5" style="text-decoration:none">
                            <i class="Hui-iconfont">&#xe6e2;</i>彻底删除
                        </a>
                        <else/>
                        <a title="编辑" href="javascript:;" onclick="showIframe('编辑','{:U('showEdit',array('id'=>$data['id']))}')" class="ml-5" style="text-decoration:none">
                            <i class="Hui-iconfont">&#xe6df;</i> 编辑
                        </a>
                        <a href="javascript:void(0);" onclick="requestUrl('{:U('restpwd',array('id'=>$data['id']))}');">
                            <span class="label label-danger radius"> 重置密码</span>
                        </a>
                        <a title="删除" href="javascript:;" onclick="delectOne('{:U('del',array('id'=>$data['id']))}',this)" class="ml-5" style="text-decoration:none">
                            <i class="Hui-iconfont">&#xe6e2;</i> 删除
                        </a>
                    </if>
                </td>
            </tr>
        </volist>
        </tbody>
        </table>
        <div class="page">{$page}</div>
    </div>
</div>
<include file="Common:footer_include"/>
<script>
    function reload() {
        var selects = $("#selects option:selected").val();
        var keyword = $("input[name='keyword']").val();
        var departmentid = $("#departmentid option:selected").val();
        var hospitalid = $("#hospitalid option:selected").val();
        var reviewed = $("#reviewed option:selected").val();
        goUrl('?selects=' + selects + '&keyword=' + keyword+'&departmentid='+departmentid+'&hospitalid='+hospitalid+'&reviewed='+reviewed);
    }
</script>
</body>
</html>